// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /order/createOrder */
export async function createOrder(
  body: CartService.OrderSubmitDTO,
  options?: { [key: string]: any }
) {
  return request<CartService.Result>(`/cart/order/createOrder`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /order/selectByUserId */
export async function selectByUserId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: CartService.selectByUserIdParams,
  options?: { [key: string]: any }
) {
  return request<CartService.Result>(`/cart/order/selectByUserId`, {
    method: 'GET',
    params: {
      ...params,
      bizOrder: undefined,
      ...params['bizOrder'],
    },
    ...(options || {}),
  })
}
